package com.xw.childhealth.service.impl;

import com.xw.childhealth.dao.XzCodeMaintainDao;
import com.xw.childhealth.entity.XzCodeMaintain;
import com.xw.childhealth.service.XzCodeMaintainService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Author: y
 * @CreateDate: 2019-11-18 10:56
 * @Version: 1.0
 */
@Service
public class XzCodeMaintainServiceImpl implements XzCodeMaintainService {

    @Autowired
    private XzCodeMaintainDao xzCodeMaintainDao;


    @Override
    public List<XzCodeMaintain> findParentNode(Integer id) {
        return xzCodeMaintainDao.findByParentIdEquals(id);
    }

    @Override
    public XzCodeMaintain findOneById(Integer id) {
        return xzCodeMaintainDao.findByIdEquals(id);
    }

    @Override
    public XzCodeMaintain save(XzCodeMaintain data) {
        return xzCodeMaintainDao.save(data);
    }

    @Override
    public void delRecord(Integer id) {
        xzCodeMaintainDao.deleteById(id);
    }

    @Override
    public List<XzCodeMaintain> findByAreaNameFullLike(String str) {
        return xzCodeMaintainDao.findByAreaNameFullLike(str);
    }
}
